
import {simpleServer} from '@/tools/servers'

/**
 * 物流线路
 */
export class RouteService {
    // 分页查询列表
    static findRoutes (pageDTO) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.findRoutes,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/logistics/Route/findRoutes', body);
    }


    //根据物流线路Id查询物流线路
    static findRoute (routeId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findRoute ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Route/findRoute',body);
    }

    //为了编辑,根据物流线路Id查询物流线路
    static findRouteForEdit(routeId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findRouteForEdit ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Route/findRouteForEdit',body);
    }

    //为了查看,根据物流线路Id查询物流线路，所有外键字段的名称都已加载
    static findRouteForView(routeId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findRouteForView ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Route/findRouteForView',body);
    }

    //创建新的物流线路
    static createRoute() {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.createRoute,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Route/createRoute',body);
    }

    //保存物流线路
    static saveRoute(route) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.saveRoute,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/logistics/Route/saveRoute', body);
    }

    //编辑物流线路
    static updateRoute (route) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.updateRoute,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/logistics/Route/updateRoute', body);
    }

    //根据物流线路Id删除物流线路
    static deleteRoute (routeId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.deleteRoute,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Route/deleteRoute',body);
    }

    //为了查看,根据物流线路Id查询物流线路，只加载ID 和 名称
    static findRoutesWithIdNameById(routeId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findRoutesWithIdNameById ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Route/findRoutesWithIdNameById',body);
    }

    //为了查看,根据物流线路 名称 查询物流线路，只加载ID 和 名称
    static findRoutesWithIdNameByName(routeName) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findRoutesWithIdNameByName ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/logistics/Route/findRoutesWithIdNameByName',body);
    }


}
